<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>输出数组的长度</title>
</head>
<body>
    <script>
        var arr=new Array();
        arr[0]='81';
        arr[2]='82';
        arr[2]='83';
        arr[3]='98';
        arr[4]='59';
        for(var i=0;i<arr.length;i++){
            console.log('第'+(i+1)+'位同学分数是：' +arr[i]);
        }
        console.log('数组的长度是:'  + arr.length);
    </script>
</body>
</html>